<?php namespace view;

class RenderHome {
	public function __construct() {
		$this->renderHeader();
		$this->renderHomeHTML();
		$this->renderFooter();
	}
	
	private function renderHeader() {
		echo '<!DOCTYPE html>
				<html id="home">
				<head>
				<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
				<title>Златният век!</title>
				<link type="text/css" rel="stylesheet" href="style/style.css"/>
				<script src="../lib/jquery-2.1.1.min.js"></script>
				</head>
				<body>
				<div id="wrapper">';
	}
	
	private function renderFooter() {
		echo '	</div>
				<div id="boxQ1" class="bg">
				<div id="question1" class="infoBox">
						<p id="textQuestion1" class="text"></p>
						<div id="ans1" class="answer"></div>
						<div id="ans2" class="answer"></div>
						<div id="ans3" class="answer"></div>
						<div id="ans4" class="answer"></div>		
				</div>
			</div>
			<div id="boxQ2" class="bg">
				<div id="question2" class="infoBox">
						<p id="textQuestion2" class="text"></p>
						<input id="openAns" type="text"/>
						<button id="submitAns" value="Изпрати" />			
				</div>
			</div>
			<div id="confirmGame" class="bg">
				<div id="confirm" class="infoBox">
					<p id="confirmMessage" class="text"></p>
					<div id="accept" class="answer">Приеми</div>
					<div id="decline" class="answer">Откажи</div>
				</div>
			</div>
			<div id="notice" class="bg">
				<div id="noticeWaiting" class="infoBox">
					<p id="waitMessage" class="text"></p>
				</div>
			</div>
			<script>$(".bg").hide();</script>		
				<script src="scripts/connection.js"></script>
				<script src="scripts/functions.js"></script>
				<script src="scripts/createroom.js"></script>
				</body>
				</html>';
	}

	private function renderHomeHTML() {

		echo '
				
		<div id="header1"> <img src="images/logo_transparent.png" /> </div>
		<div id="playerInfo">
			<div class="titles">������ ������</div>
			<p class="pOpts">���: </p>
			<p class="pOpts">�������: </p>
			<p class="pOpts">��������� ����: </p>
			<p class="pOpts">���� ����: </p>
		</div>
		<div id="chat"> <p class="titles">Чат<b></b></p>
		<div id="chatbox"></div>
			
        <input name="usermsg" type="text" id="usermsg" size="76" />
        <input name="submitmsg" type="submit"  id="submitmsg" value="Изпрати" />
</div>
		<div id="rooms">
			<div class="titles">Стаи</div>
			<div id="roomBox">
			<p class="r1">Стая <input type="button" value="Влез" name="join" id="2"></p>
			<p class="r1">Стая <input type="button" value="Влез" name="join"></p>
				</div>
				<div id="createRoom" class="titles"><input type="text" id="create-room-input"/> <p id="create-room">Създай стая</p></div>
		</div>
		<div id="footer">
			<a class="footerLinks" href="#">За нас</a>
			<a class="footerLinks" href="#">�������</a>
			<a class="footerLinks" href="#">��������</a>
		</div>				
	';
	}
}